import apiManager from './apiManager'
import common from './common'
import validate from './validate'
import image from './image'
import date from './date'
import video from './video'
import location from './location'
import taroApis from './taroApis'

type TComm = {
  $apis: typeof apiManager
  $initPage: typeof common.initPage
  $toast: typeof common.toast
  $loading: typeof common.loading
  $sessionCache: typeof common.sessionCache
  $checkReg: typeof common.checkReg
  $isLoginAndResidentAuth: typeof common.isLoginAndResidentAuth
  $hasBottomSafeArea: typeof common.hasBottomSafeArea
  $hasOperatePermission: typeof common.hasOperatePermission
  $hasPermissionByRule: typeof common.hasPermissionByRule
  $validate: typeof validate
  $image: typeof image
  $date: typeof date
  $video: typeof video
  $location: typeof location
  $taroApis: typeof taroApis
}
const utils: TComm = {
  $apis: apiManager,
  $initPage: common.initPage,
  $toast: common.toast,
  $loading: common.loading,
  $sessionCache: common.sessionCache,
  $checkReg: common.checkReg, // 校验
  $hasBottomSafeArea: common.hasBottomSafeArea,
  $hasOperatePermission: common.hasOperatePermission,
  $hasPermissionByRule: common.hasPermissionByRule,
  $isLoginAndResidentAuth: common.isLoginAndResidentAuth,
  $validate: validate,
  $image: image,
  $date: date,
  $video: video,
  $location: location,
  $taroApis: taroApis
}


export default utils
